package NewGWMisc;

import java.util.ArrayList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;


import utils.variable;
import utils.xMLGear;


public class templateGWMaker
	{	
	/************
	 * Variables
	 ************/
	
	
	/***************
	 * Constructeur
	 * @throws Exception 
	 ***************/
	public templateGWMaker() throws Exception
		{
		//Variables
		
		/********
		 * Regex
		 ********/
		ccmRegex();
		/********/
		}
	
	private void ccmRegex() throws Exception
		{
		ArrayList<ArrayList<String>> arr;
		ArrayList<VarGW> listTemp;
		ArrayList<String> waitingTime;
		
		//GW
		for(int k = 0; k<variable.getGWParam().size(); k++)
			{
			listTemp = null;
			listTemp = new ArrayList<VarGW>();
			for(int i = 0; i<variable.getGWParam().get(k).size(); i++)
				{
				arr = null;
				arr = new ArrayList<ArrayList<String>>();
				waitingTime = null;
				waitingTime = new ArrayList<String>();
				for(int j = 0; j<variable.getGWParam().get(k).get(i).length; j++)
					{
					variable.getLogger().debug(variable.getGWParam().get(k).get(i)[j][0]+" : "+variable.getGWParam().get(k).get(i)[j][1]);
					waitingTime.add(variable.getGWParam().get(k).get(i)[j][0]);
					arr.add(variable.doRegex(variable.getGWParam().get(k).get(i)[j][1]));
					}
				listTemp.add(new VarGW(arr,waitingTime));
				}
			variable.getGW().add(listTemp);
			}
		}
	
	/*2014*//*AR 8)*/
	}
